package com.haoliang.spring.component.java.config;

import com.haoliang.spring.component.java.component.PersonComponet;
import com.haoliang.spring.component.java.type.filter.CustomTypeFilter;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Service;

/**
 * @Author zhaohaoliang
 * @Date 创建于 上午10:06 2019/3/10
 * @Description 请输入类的描述信息
 */
@Configuration
@ComponentScan(value = "com.haoliang.spring.component.java", includeFilters = {
        @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = {Controller.class}),
        @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, classes = {PersonComponet.class}),
        @ComponentScan.Filter(type = FilterType.CUSTOM, classes = {CustomTypeFilter.class})
}, useDefaultFilters = false)
// includeFilters,包含哪些文件
// excludeFilters,排除哪些文件
// FilterType.ANNOTATION 按照注解过滤,只包含注解类型
// FilterType.ASSIGNABLE_TYPE 按照给定类型过滤，只包含组件类型
// FilterType.ASPECTJ 按照ASPECTJ表达式类型过滤
// FilterType.REGEX 按照正则表达式类型过滤
// FilterType.CUSTOM 按照自定义类型过滤
public class MainConfig {

}
